from django.urls import converters
#import os
#import django
# 设置环境变量
#os.environ["DJANGO_SETTINGS_MODULE"] = 'meiduo_mall.settings'
#django.setup()
class UsernameStr:
    regex = '[a-zA-Z0-9_-]{5,20}'

    def to_python(self, value):
        return value


class MobileInt:
    regex = '1[3-9]\d{9}'

    def to_python(self, value):
        return value

class UUIDStr:
    regex = '[\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12}'

    def to_python(self, value):
        return value